package entity

import (
	"github.com/lib/pq"
)

type Feedback struct {
	Id int64 `gorm:"column:id;type:BIGINT;primary_key" json:"id"`

	UserId int64 `gorm:"column:user_id;type:BIGINT" json:"user_id"`

	UserName string `gorm:"column:user_name;type:VARCHAR(255)" json:"user_name"`

	Phone string `gorm:"column:phone;type:VARCHAR(255)" json:"phone"`

	Type int `gorm:"column:type;type:TINYINT" json:"type"`

	Details string `gorm:"column:details;type:VARCHAR(255)" json:"details"`

	Images pq.StringArray `gorm:"column:images;type:VARCHAR[]" json:"images"`

	CreatedAt int64 `gorm:"column:created_at;type:BIGINT" json:"created_at"`

	UpdatedAt int64 `gorm:"column:updated_at;type:BIGINT" json:"updated_at"`
}

func (a *Feedback) TableName() string {
	return "feedbacks"
}
